package com.wyd.command.cmd;

import com.wyd.command.receiver.Door;

/**
 * @author Yudi Wang
 * @date 2022/1/27 16:27
 */
public class DoorOpenCommand implements Command{
    private Door door;

    public DoorOpenCommand(Door door) {
        this.door = door;
    }

    public void execute() {
        door.open();
    }

    public void undo() {
        door.close();
    }
}
